package jmu.edu.yjc.domain.entity.neo4j.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import org.springframework.data.neo4j.core.schema.Node;

import java.util.Objects;

@Data
@Builder
@AllArgsConstructor
public class RelationVo {
    @ExcelProperty(index = 0)
    private String resName;

    @ExcelProperty(index = 1)
    private String relation;

    @ExcelProperty(index = 2)
    private String tarName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof RelationVo)) return false;
        RelationVo that = (RelationVo) o;
        return Objects.equals(resName, that.resName) &&
                Objects.equals(tarName, that.tarName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(resName, tarName);
    }
}
